<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>背景属性</title>
		<style>
			bo dy{
				width: 500px;
				height: 10000px;/*滚动条*/
				/*背景尺寸：函数：contain[多] cover【保证原生图大小】*/
				background-size: contain;/*等比例宽高【缩放】。保证页面图片全部显示*/
				background-image: url(img/小新.png);
				/*背景图控制属性:滚动scoll【默认】, 固定fixed*/
				background-attachment: fixed;
			}
			
			div{
				width: 500px;
				height: 500px;
				/*等同于border的功能：确定选择器是否选中、布局*/
				backgro und-color: #e4393c;
				background-image: url(img/小新.png);
				/*背景图小于空【自动平铺】：去掉平铺*/
				background-repeat: no-repeat;
				backgr ound-repeat: repeat-x;
				backg round-repeat: repeat-y;
				/*背景尺寸,属性值：数值/百分比
				                 函数 cover  等比例宽高【放大】，图片覆盖整个容器
								    contain  等比例宽高【缩放】。保证页面图片全部显示
				*/
			   border: 1px solid red;
				background-size: 20%;
				/*背景定位：先决条件，背景图小于外围空间*/
				background-position: bottom center;/*位置固定9个点*/
				background-position: 80% 0;/*任意定位置：数值px+数值%*/
				
				/*复合属性:全部子属性顺序*/
				/*background: background-image background-color background-position
				 background-size background-repeat和background-attatchment;
				 */
				
			}
		</style>
	</head>
	<body>
		Lorem ipsum dolor sit amet consectetur adipisicing elit. Odit corrupti minima numquam voluptatibus eius sunt, dolor dolores, nam assumenda voluptate at incidunt velit quis doloremque eum iure tempore nesciunt quasi!
		Lorem ipsum dolor sit amet consectetur adipisicing elit. Unde sit beatae eveniet officiis illum? Placeat dolore rerum asperiores porro eveniet repudiandae laudantium nemo omnis, sequi adipisci sit doloremque praesentium est?
		<!-- css背景:背景图、背景颜色  ---区别：页面任意移动位置
		     html图片img             ---区别：页面定死位置
			 子属性
			 background-color背景颜色：十六进制色值；
			 复合属性--省去子属性
			 background:十六进制色值；
			 -->
			 <div></div>
	</body>
</html>